﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Meeting.Entity.CommonEntity;
using XF.Meeting.Entity.dbEntity;
using XF.Meeting.Entity.DTO;
using XF.Meeting.Entity.Query;
using XF.Meeting.Entity.View;

namespace XF.Meeting.IDal
{
    public interface IMeetingDal
    {
        DataSet GetMeeetUserPhoneFromOrgcalendars(int iD, out string StrError);
        Task<bool> UpdateWXEndState(int CinfoId, out string strError);
        Task<DataTable> GetMeetingRoomByID(MeetingRoomQuery query, out string strError);
        Task<bool> UpdateMeetingRoomByID(MeetingRoomOrder entity, out string strError);
        Task<bool> DeleteMeetingRoom(MeetingRoomQuery entity, out string strError);
        Task<Tuple<bool, int>> MinutesOrder(MeetingOrder entity, out string strError);
        Task<bool> UpdateConferenceMinutes(MeetingOrder entity, out string strError);
        Task<Tuple<DataTable, int, int>> GetCInfoMinutesList(CInfoQuery query, out string strError);
        Task<Tuple<DataTable, int, int>> GetOrgMinutes(CInfoQuery query, out string strError);
        Task<(DataTable, DataTable)> GetCInfoMinutesByID(CInfoQuery query, out string strError);
        Task<(bool, int)> MeetingOrder(MeetingOrder entity, out string strError);
        Task<bool> InsertMeetingItemId(ItemList entity, out string strError);
        Task<bool> UpdateConferenceInfo(MeetingOrder entity, out string strError);
        Task<Tuple<DataTable, DataTable, int, int>> GetCRoomAndCInfo(RoomQuery query, out string strError);
        Task<Tuple<DataTable, DataTable, int, int, bool>> GetMeetRoomAndInfoForMobile(RoomQuery query, out string strError);
        Task<Tuple<DataTable, DataTable, DataTable>> GetMeetRoomAndInfoForPad(CRoomPadQuery query, out string strError);
        Task<Tuple<DataTable, DataTable>> GetCRoomAndCInfoForPadWithOutColor(CRoomPadQuery query, out string strError);
        Task<Tuple<DataTable, int, int>> GetCRoomByRID(RoomQuery query, out string strError);
        Task<Tuple<DataTable, int, int>> GetCRoomInfoListByRID(RoomQuery query, out string strError);
        Task<Tuple<DataTable, int, int, bool>> GetCRoomByKey(RoomQuery query, out string strError);
        Task<DataTable> GetAllGMSRoom(out string strError);
        Task<Tuple<DataTable, int, int>> GetCInfoByAdmin(CInfoQuery query, out string strError);
        Task<Tuple<DataTable, int, int, bool>> GetCInfoByUser(CInfoQuery query, out string strError);
        Task<(DataTable, DataTable)> GetCInfoByID(CInfoQuery query, out string strError);
        Task<DataTable> GetCInfoByID(int InfoId);
        DataSet getMeetInfoAndUserPhone(int iD, out string StrError);
        Task<bool> updateWxState(int CinfoId, out string strError);
        bool IsSendWX(int CinfoId, out string strError);
        Task<bool> MeetUpdateEnd(int CinfoId, out string strError);
        Task<bool> UpdateMeetingEnd(CInfoQuery entity, out string strError);
        Task<bool> UpdateMeetingInfoByID(MeetingOrder entity, out string strError);
        Task<Tuple<DataTable, int, int, bool>> GetAllCInfoByUser(CInfoQuery query, out string strError);
        Task<bool> TransferMeeting(TransferMeeting entity, out string strError);
        Task<bool> ExtendMeeting(ExtendMeeting entity, out string strError);
        Task<bool> DeleteMeetingInfo(TransferMeeting entity, out string strError);
        Task<bool> AddMeetingEquipment(MeetingEquipment entity, out string strError);
        Task<bool> DeleteMeetingEquipment(MeetingEquipment entity, out string strError);
        Task<bool> UpdateMeetingEquipment(MeetingEquipment entity, out string strError);
        Task<Tuple<DataTable, int, int>> GetMeetingEquipment(EquipmentQuery query, out string strError);
        Task<bool> AddMeetingRoom(MeetingRoomOrder entity, out string strError);
        Task<(DataTable, DataTable)> GetRoomInfoByTime(CRoomTimeQuery query, out string strError);
        Task<bool> ApprovalMeeting(ApprovalMeeting entity, out string strError);
        Task<DataTable> CheckMinutes(CheckMinutesQuery query, out string strError);
        Task<DataTable> GetMeetingCountByUserID(UserIDAndTime query, out string strError);
        Task<(bool, int, string)> SignInCInfo(string mobile, string cinfoId);
        Task<(bool, int, string)> GetRoomQCState(string croomId);
        Task<DataTable> GetConferenceNotice(out string strError);
        Task<bool> UpdateConferenceNotice(ConferenceNotice entity, out string strError);
        Task<DataSet> spGetCroomInfoByRoomId(string croomId, out string strError);
        Task<DataTable> GetCRoomApproval(ConferenceRoom query, out string strError);
        Task<Tuple<DataTable, int, int>> GetTransferRecord(TransferMeeting query, out string strError);
        Task<bool> MinutesPointsDeducted(CheckMinutesEntity entity, out string strError);
        Task<DataTable> GetOrgCalendars(CalendarsMeetQuery query, out string strError);
        Task<DataTable> GetAllMeetingRoom(out string strError);
        Task<bool> UpdateRoomWXID(int ID, int wxid, out string strError);
        Task<bool> UpdatecCInfoSchedule_id(int ID, string Schedule_id, out string strError);
        Task<DataTable> GetCInfoPwdByID(int infoId);
        Task<bool> GheckPassWord(string password, DateTime date, out int ReturnValue);
        Task<DataTable> GetStrategyInfo(out string strError);
        Task<DataTable> GetStrategyInfoByID(StrategyInfo query, out string strError);
        Task<(bool, int, string)> SencondSignInCInfo(string user, string sencondId, string firstCInfoId);
        Task<DataTable> GetCRoomTypeByID(ConferenceRoom query, out string strError);
        Task<Tuple<DataTable, int, int>> GetAllCInfoPassWord(CInfoQuery query, out string strError);
        Task<DataTable> GetUserListForMeetEnd(DateTime dt, out string StrError);
        Task<Tuple<bool, int>> OrgcalendarsOrder(MeetingOrder entity, out string strError);
        Task<DataTable> GetCInfoByRoomIdAndUserId(string v, string userid, out string strError);
        /// <summary>
        /// 城市管理员管理视频会议室
        /// </summary>
        /// <param name="query"></param>
        /// <param name="strError"></param>
        /// <returns></returns>
        Task<Tuple<DataTable, int, int, bool>> GetAllCInfoGroupByUser(CInfoQuery query, out string strError);
        Task<Tuple<bool, int>> UpdateOrgcalendars(MeetingOrder entity, out string strError);
        Task<Tuple<bool, int>> DeleteOrgcalendars(MeetingOrder entity, out string strError);
        Task<(DataTable, DataTable, DataTable)> GetOrgcalendarsByID(CInfoQuery query, out string strError);
        // Task<(bool, int)> InsertCInfoToOrgcalendars(int ID, out string strError);
        Task<DataTable> GetAllColor(int padType, out string strError);
        Task<DataTable> GetStateColorByPadType(int padType, out string strError);
        Task<bool> PadColorUpdate(StateColorQuery p, out string strError);
        (bool, int) InsertCInfoToOrgcalendars(int ID, out string strError);
        (bool, int) ChickOrgcalendarsIsHaveCInfo(int ID, out string strError);
        (bool, int) UpdateCInfoToOrgcalendars(int ID, out string strError);
        (bool, int) deleteCInfoToOrgcalendars(int ID, out string strError);
        Task<bool> CheckUserHaveCalendarsAuth(MeetingOrder entity, out string strError);
        Task<(DataTable, DataTable, DataTable)> QuicklyMeetingOrder(CInfoQuery query, out string strError);

    }
}
